package com.lzp.user.pojo.dto;

import com.lzp.user.enumeration.UserSex;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;


@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Component
public class UserDTO {

    /**
     * 用户ID
     */
    private Long id;
    /**
     * 用户名
     */
    @NotBlank(message = "Username cannot be blank")
    private String username;
    /**
     * 密码
     */
    @NotBlank(message = "password cannot be blank")
    private String password;
    /**
     * 昵称
     */
    private String nickname;
    /**
     * 性别
     */
    private UserSex sex;
    /**
     * 年龄
     */
    private Integer age;
    /**
     * 创建时间
     */
    private LocalDateTime createTime;
}
